package com.qianniu.napi.common.util;

import java.awt.*;

/**
 * Created by chenxuebin on 2017/8/3.
 */
public class TemplateTheme {

    private Color bgColor;
    private Color frontColor;
    private String frontColorStr;

    public TemplateTheme(){
        super();
    }

    public TemplateTheme(Color bgColor, Color frontColor){
        this.bgColor = bgColor;
        this.frontColor = frontColor;
        this.frontColorStr = ColorUtil.toHexStr(frontColor).substring(1);
    }

    public TemplateTheme(String bgColor, String frontColor){
        this.bgColor = ColorUtil.toColor(bgColor);
        this.frontColor = ColorUtil.toColor(frontColor);
        this.frontColorStr = frontColor.toUpperCase().substring(1);
    }

    public TemplateTheme(String frontColor){
        this.frontColor = ColorUtil.toColor(frontColor);
        this.bgColor = ColorUtil.toThemeColor(frontColor);
        this.frontColorStr = frontColor.toUpperCase().substring(1);
    }

    public Color getBgColor() {
        return bgColor;
    }

    public void setBgColor(Color bgColor) {
        this.bgColor = bgColor;
    }

    public Color getFrontColor() {
        return frontColor;
    }

    public void setFrontColor(Color frontColor) {
        this.frontColor = frontColor;
    }


}
